package com.demo.emailloginregister.controller;

import com.demo.emailloginregister.pojo.User;
import com.demo.emailloginregister.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Controller 不可使用RestControoler
 * 视图解析器InternalResourceViewResolver会失效，无法解析html、
 * jsp页面进而跳转到指定的页面，而是返回return的内容
 * */
@Controller
public class SystemController {
    @Autowired
    private UserService userService;

    /**
     * 登录
     * */
    @GetMapping("/login")
    public String login(){

       return "login";
    }

    /**
     * 注册
     * */
    @GetMapping("/registry")
    public String registry(User user){



        return "registry";
    }

}
